package com.myhome.money.base.designpattern.state;

public class Context {
    private State state;

    public Context(State state) {
        this.state = state;
    }

    public State getState() {
        return state;
    }

    public void setState(State state) {
        this.state = state;
    }

    public String getMessage() {
        System.out.println("状态改变");
        return state.getState(this);
    }
}
